Skip to content

fix(rest): regenerate the schema inventory inside the refresh land step - #1378

Merged
AnthonyTsu1984 merged 1 commit into
masterfrom
fix/rest-refresh-schema-inventory-regen
Nov 19, 2026
Merged

AnthonyTsu1984 merged 1 commit into
masterfrom
fix/rest-refresh-schema-inventory-regen

Conversation

@AnthonyTsu1984

Copy link
Copy Markdown
Collaborator

Root cause

The schema-attribution inventory (conformance/inventory/schema-inventory.json) is derived from the fragment bytes and its hermetic drift gate (inventory.test.mjs, selected by the change-scoped test union on any fragment change) requires the committed file to equal a byte-identical regeneration.

The refresh workflow landed fragment deltas, titles, ledger drafts, the lifecycle-evidence inventory, and the lock pin bump — but never regenerated schema-inventory.json, and its git add only covered rest/meta. Every fragment-carrying refresh dispatch therefore failed the change-scoped union and the refresh PR never opened:

  • run 44016598070 (11-17) — same failure
  • run 44457762110 (11-19) — upstream added a writeCondition request field to POST /v2/vectordb/entities/insert and upsert; the applier staged it into 04-vector-operations-v2.json, the inventory trailed, the gate failed, PR step skipped

Change

  • The land step now spawns generate-inventory.mjs — the very command the drift gate runs — into the atomic commit whenever fragment bytes moved (a zero-diff regeneration is impossible: the inventory pins a sha256 per fragment).
  • git add extends to rest/conformance/inventory/schema-inventory.json (it lives outside rest/meta).
  • Step renamed to include the inventories; atomicity comment, the human-readable test-matrix row, and the machine-readable rest-upstream-pipeline reason updated to match.

Verification

Local replay with the real retained artifact fragment from run 44457762110 (the staged writeCondition fragment):

  • before the change: not ok 1 - schema-inventory regenerates byte-identical (drift gate) (CI failure reproduced)
  • after the change: # pass 2 / # fail 0; inventory diff carries exactly the 2 writeCondition entries; simulation files restored afterward

Selector union for .github/workflows/rest-upstream-refresh.yml + schema-inventory.json (all green locally):

  • pnpm test:rest-upstream, pnpm test:rest-publication-contract, pnpm test:workflow-policy, pnpm test:workflow-matrix
  • focused node --test: drift-watchdog, dispatch-refresh, dispatch-linkage-workflow, decide-batches, branch-plan, translate-additions, refresh-lifecycle-inventory, assert-track-projection, webcontent-sync-drift, archive, inventory, cases-integrity, diff, case-runner, goldens-integrity, schema-verify, deploy contracts ×3
  • actionlint on the changed workflow, git diff --check

CI is authoritative for the shared-docs gate (known local load flakes); the union above contains no shared-docs gate.

The schema-attribution inventory (conformance/inventory/schema-inventory.json)
is derived from the fragment bytes and its hermetic drift gate requires the
committed file to equal a byte-identical regeneration. The refresh workflow
landed fragment deltas without regenerating the inventory, so every
fragment-carrying refresh dispatch failed the change-scoped test union and
the refresh PR never opened (runs 44016598070 on 11-17 and 44457762110 on
11-19, both blocked on the upstream writeCondition addition to
insert/upsert).

The land step now spawns the same generator command the gate runs, inside
the atomic commit, and the git add covers the inventory path. Local replay
with the real retained artifact fragment reproduces the drift failure
before the change and a green gate after it.
@AnthonyTsu1984
AnthonyTsu1984 merged commit 87702b7 into master Nov 19, 2026
16 checks passed
@AnthonyTsu1984
AnthonyTsu1984 deleted the fix/rest-refresh-schema-inventory-regen branch November 19, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant